import math


class Test1():
    def sum():
        num1 = 1.1
        num2 = 2.3
        sum = num1 + num2
        print(f'{num1}+{num2}={sum}')
    # sum()


class Test2():
    def fn(n):
        result = 1
        for i in range(1,n+1):
            result *= i
            # print(i)
        return result

    # print(fn(5))


class Test3():
    def fn(r):
        print(math.pi)
        return r*r*math.pi

    # print(fn(34))


class Test4():
    def fn(num):
        if num in [1,2]:
            return False
        for i in range(2,num-1):
            return num%i == 0
        return False

    def fn2(num1,num2):
        list1 = []
        for num in range(num1,num2):
            if not Test4.fn(num):
                list1.append(num)

        return list1
    
# print(
#     Test4.fn2(10,3000000)
# )
    

class Test5():
    def fn(num):
        sum = 0
        for i in range(1,num+1):
            sum += i*i 
        return sum

    # print(
    #     fn(4)
    # )


class Test6():
    def fn(list_):
        sum = 0
        for i in list_:
            sum+=i
        return sum

    def fn2(list_):
        sum = 0
        for i in list_:
            if i%2==0:
                sum+=i
        return sum

    # print(
    #     fn(list1)
    # )
    

class Test7():
    def fn(list_):
        sum = 0
        for i in list_:
            if i%2==1:
                sum+=i
        return sum

    list1 = [1,2,3,4,5,6]

    # print(
    #     fn(list1)
    # )


class Test8():
    
    def fn(list1,list2):
        for num in list2:
            list1.remove(num)
        print(list1)
    

    list1 = [1,2,3,4]
    list2 = [2,3]

    # fn(list1,list2)

    # data1 =[item for item in list1 if item%2==0]
    # data2 =[item for item in list1 if item%2==1]
    # data3 =[item for item in list1 if item not in list2] // 老师的这个范例就是正确的，我的会报错

    # print(data1)
    # print(data2)
    # print(data3)

class Test9():
    def fn(list1):
        list2 = []
        for i in list1:
            if i not in list2:
                list2.append(i)
        return list2
            
    list1 = [1,2,3,3,2]

    # print(
    #     fn(list1)
    # )

    # print(
    #     list(set(list1))
    # )


class Test10():
    
    list1 = [1,2,3,3,2]
    list1.sort(reverse=True)
    # print(list1)

    result =sorted(list1,reverse=True)
    # print(result)
    pass
